package light.head.model.inv;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;


/**
 * 单据编号配置(自动+1)
 * @author yuleidian
 *
 */
@Entity
@Table
public class InvBillCodeConfig implements Serializable {
	private static final long serialVersionUID = 8332977598493407259L;
	private Integer code;				// 流水号
	private String head = "JKQ";		// 头部(例如 SKD HS)
	private String body = "yyyyMM";		// 身体(传入的如日期 UUID )
	private String foot = "00000";		// 脚部(传入的如 0000 , 000)
	private Integer oc;					// 机构编号
	private Integer cu;					// 创建人
	private Date ct = new Date();		// 创建时间
	private Boolean deleted = false;	// 是否删除
	
	
	
	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	@Column
	public Integer getCode() {
		return code;
	}
	@Column
	public String getHead() {
		return head;
	}
	@Column
	public String getBody() {
		return body;
	}
	@Column
	public String getFoot() {
		return foot;
	}
	@Column
	public Integer getOc() {
		return oc;
	}
	@Column()
	public Integer getCu() {
		return cu;
	}
	@Temporal(TemporalType.TIMESTAMP)
	@Column(updatable = false, nullable = false)
	public Date getCt() {
		return ct;
	}
	@Column
	public Boolean getDeleted() {
		return deleted;
	}

	public void setCode(Integer code) {
		this.code = code;
	}
	public void setHead(String head) {
		this.head = head;
	}
	public void setBody(String body) {
		this.body = body;
	}
	public void setFoot(String foot) {
		this.foot = foot;
	}
	public void setOc(Integer oc) {
		this.oc = oc;
	}
	public void setCu(Integer cu) {
		this.cu = cu;
	}
	public void setCt(Date ct) {
		this.ct = ct;
	}
	public void setDeleted(Boolean deleted) {
		this.deleted = deleted;
	}
	
	
}
